import java.util.Scanner;

public class Solution {
    public int NumStr(String s){
        int len = s.length();
        int count = 0;
        for (int i = 0; i < len; i++) {
            if(Character.isDigit(s.charAt(i))){
                count++;
            }
        }
        return count;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNextLine()){
            String s = in.nextLine();
            Solution solution = new Solution();
            int result = solution.NumStr(s);
            System.out.println(result);
        }
    }
}
